package example.documentbased.editorModule
{
	import example.documentbased.editorModule.common.EditorMenuHelper;
	import example.documentbased.editorModule.common.EditorViewHelper;
	import example.documentbased.editorModule.controller.ApplyMenyItemCommand;
	import example.documentbased.editorModule.controller.ChangeEditorNameCommand;
	import example.documentbased.editorModule.controller.CloseAllDocumentsCommand;
	import example.documentbased.editorModule.controller.CloseDocumentCommand;
	import example.documentbased.editorModule.controller.CreateDocumentCommand;
	import example.documentbased.editorModule.controller.DeleteDocumentCommand;
	import example.documentbased.editorModule.controller.EditDocumentCommand;
	import example.documentbased.editorModule.controller.EditorController;
	import example.documentbased.editorModule.controller.IEditorController;
	import example.documentbased.editorModule.controller.OpenDocumentCommand;
	import example.documentbased.editorModule.controller.SaveAllDocumentsCommand;
	import example.documentbased.editorModule.controller.SaveAsDocumentCommand;
	import example.documentbased.editorModule.controller.SaveDocumentCommand;
	import example.documentbased.editorModule.controller.SaveEditorCommand;
	import example.documentbased.editorModule.controller.SelectDocumentCommand;
	import example.documentbased.editorModule.controller.SetCurrentDocumentCommand;
	import example.documentbased.editorModule.controller.SetEditorCommand;
	import example.documentbased.editorModule.controller.UpdateDocumentCommand;
	import example.documentbased.editorModule.controller.UpdateEditorMenuCommand;
	import example.documentbased.editorModule.mediators.EditorModuleViewMediator;
	import example.documentbased.editorModule.models.EditorModuleModel;
	import example.documentbased.editorModule.views.EditorModuleView;
	
	import flash.display.DisplayObject;
	
	import org.etherframework.core.Module;
	
	public class EditorModule extends Module
	{
		public function EditorModule(view:DisplayObject)
		{
			super(view);
		}
		
		override public function start():void
		{
			dependencies.addClass(SetEditorCommand);
			dependencies.addClass(CreateDocumentCommand);
			dependencies.addClass(CloseDocumentCommand);
			dependencies.addClass(OpenDocumentCommand);
			dependencies.addClass(SetCurrentDocumentCommand);
			dependencies.addClass(CloseAllDocumentsCommand);
			dependencies.addClass(SaveDocumentCommand);
			dependencies.addClass(SaveAsDocumentCommand);
			dependencies.addClass(SelectDocumentCommand);
			dependencies.addClass(SaveAllDocumentsCommand);
			dependencies.addClass(SaveEditorCommand);
			dependencies.addClass(EditDocumentCommand);
			dependencies.addClass(UpdateDocumentCommand);
			dependencies.addClass(ChangeEditorNameCommand);
			dependencies.addClass(ApplyMenyItemCommand);
			dependencies.addClass(UpdateEditorMenuCommand);
			dependencies.addClass(DeleteDocumentCommand);
			dependencies.addSingleton(EditorMenuHelper);
			
			dependencies.addClass(EditorController, IEditorController);
			dependencies.addSingleton(EditorModuleModel);
			dependencies.addSingleton(EditorViewHelper).getInstance();
			
			mediators.addMediator(EditorModuleView, EditorModuleViewMediator);
		}
	}
}